SetAxisTorque
Sets the target torque of an axis.
Syntax
KsError SetAxisTorque(
int Index,
double Torque
);
Parameters
Index: the index of an axis. Indexes are zero based. Aliases affect this parameter.
Torque: the torque of an axis. The unit is percent (%). The minimum accepted value is 0.1.
Return value
If the function succeeds, it returns errNoError
, otherwise an error code. For more information about the error code, see the KsError list.
Remarks
- In the Direct Torque mode, you can set an axis' torque every cycle based on your needs or customized interpolation.
- This function can be used only in the Direct Torque control mode, in which this is the only function to set the target torque of an axis.
Example
Copy
KsError nRet = SetAxisTorque(0, 11.5);
Requirements
RT | Win32 | |
---|---|---|
Minimum supported version | 4.0 | 4.0 |
Header | ksmotion.h | ksmotion.h |
Library | KsApi_Rtss.lib | KsApi.lib |
See also